package logging

import (
	"fmt"
	"os"
	"time"

	"bbtradeByGo/pkg/config"
)

// getLogFilePath get the log file save path
func getLogFilePath() string {
	gopath := os.Getenv("GOPATH")
	return fmt.Sprintf("%s%s%s%s", gopath, "/src/bbtradeByGo/", config.LogsSetting.RuntimeRootPath, config.LogsSetting.LogSavePath)
}

// getLogFileName get the save name of the log file
func getLogFileName() string {
	return fmt.Sprintf("%s%s.%s",
		config.LogsSetting.LogSaveName,
		time.Now().Format(config.LogsSetting.TimeFormat),
		config.LogsSetting.LogFileExt,
	)
}
